/**
 * https://ac.nowcoder.com/acm/problem/13223
 */

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int num(int sum){
    int h=0;
    while(sum){
        h++;
        sum >>=1;
    }
    return h;
}
int main()
{
    int n;
    cin>>n;
    vector<int> v(n);
    for(int i=0;i<n;++i)
        cin>>v[i];
    int k=v[0];
    sort(v.begin(),v.end());
    int h=0;
    while(v[h]<=k)
        h++;
    cout<<num(h)-1<<endl;
    return 0;
}